package com.mlog.njyjy.ndop.monitor.common.domain;

import com.jfinal.plugin.activerecord.Model;
import com.mlog.njyjy.ndop.monitor.common.support.Constants;
import com.mlog.njyjy.ndop.share.sql.annotation.Column;
import com.mlog.njyjy.ndop.share.sql.annotation.Id;
import com.mlog.njyjy.ndop.share.sql.annotation.Table;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 采集方式配置
 *
 * @author zyz
 * @version v1.0, 2020/07/28
 */
@Data
@Accessors(chain = true)
@Table(prefix = Constants.TBL_PRODUCT_MONITOR_PREFIX, comment = "采集配置表")
public class CollectWay extends Model<CollectWay> {

    @Id
    private int id;

    /**
     * ftp  smb  ...
     */
    @Column(nullable = false, comment = "采集模式")
    private String mode;

    @Column(nullable = false, comment = "产品服务器地址")
    private String host;

    @Column(comment = "端口号")
    private int port;

    @Column(comment = "服务器存储路径")
    private String path;

    @Column(nullable = false, comment = "用户名")
    private String username;

    @Column(nullable = false, comment = "密码")
    private String password;

    /**
     * 创建时间
     */
    @Column(updatable = false)
    private LocalDateTime createAt;

    private LocalDateTime updateAt;
}
